package com.yonyou.cyxdms.sysAuth.service.dto.dealer;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author duxiaoguang
 * @since 2019-09-04
 */
@TableName("tm_msg_record")
public class MsgRecordPO extends DMSBasePO<MsgRecordPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 消息id
     */
    @TableId(value = "MSG_ID", type = IdType.AUTO)
    private Integer msgId;
    /**
     * 消息类型
     */
    @TableField("APP_ID")
    private String appId;
    /**
     * 消息类型
     */
    @TableField("MSG_TYPE")
    private String msgType;

    @TableField("USER_ID")
    private Integer userId;

    /**
     * 消息类型
     */
    @TableField("MSG_CODE")
    private String msgCode;
    /**
     * 标题
     */
    @TableField("MSG_TITLE")
    private String msgTitle;
    /**
     * 消息内容
     */
    @TableField("MSG_CONTENT")
    private Object msgContent;

    @TableField("TEMPLATE_CODE")
    private Integer templateCode;

    @TableField("MSG_NOTICE_SOURCE")
    private Integer msgNoticeSource;
    /**
     * 公告确认状态
     */
    @TableField("NOTICE_CONFIRM")
    private Integer noticeConfirm;
    /**
     * 公告时间
     */
    @TableField("MSG_NOTICE_TIME")
    private String msgNoticeTime;

    @TableField("COMPANY_ID")
    private Integer companyId;

    @TableField("MSG_STATUS")
    private Integer msgStatus;
    /**
     * 发送人
     */
    @TableField("MSG_SENDER")
    private String msgSender;
    /**
     * 接收人
     */
    @TableField("MSG_RECEIVER")
    private String msgReceiver;

    @TableField("CREATED_AT")
    private Date createdAt;

    @TableField("CREATED_AT")
    private Date updatedAt;

    @TableField("IS_DELETED")
    private Integer isDeleted;

    public MsgRecordPO() {
        super();
    }

    public Integer getNoticeConfirm() {
        return noticeConfirm;
    }

    @Override
    public String toString() {
        return "MsgRecordPO{" +
                "msgId=" + msgId +
                ", appId='" + appId + '\'' +
                ", msgType='" + msgType + '\'' +
                ", userId=" + userId +
                ", msgCode='" + msgCode + '\'' +
                ", msgTitle='" + msgTitle + '\'' +
                ", msgContent=" + msgContent +
                ", templateCode=" + templateCode +
                ", msgNoticeSource=" + msgNoticeSource +
                ", noticeConfirm=" + noticeConfirm +
                ", msgNoticeTime=" + msgNoticeTime +
                ", companyId=" + companyId +
                ", msgStatus=" + msgStatus +
                ", msgSender='" + msgSender + '\'' +
                ", msgReceiver='" + msgReceiver + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", isDeleted=" + isDeleted +
                '}';
    }

    @Override
    public Integer getIsDeleted() {
        return isDeleted;
    }

    public String getMsgNoticeTime() {
        return msgNoticeTime;
    }

    public void setMsgNoticeTime(String msgNoticeTime) {
        this.msgNoticeTime = msgNoticeTime;
    }

    @Override
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public void setNoticeConfirm(Integer noticeConfirm) {
        this.noticeConfirm = noticeConfirm;
    }

    public Integer getTemplateCode() {
        return templateCode;
    }

    public String getMsgTitle() {
        return msgTitle;
    }

    public void setMsgTitle(String msgTitle) {
        this.msgTitle = msgTitle;
    }

    public Integer getMsgNoticeSource() {
        return msgNoticeSource;
    }

    public void setMsgNoticeSource(Integer msgNoticeSource) {
        this.msgNoticeSource = msgNoticeSource;
    }


    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Integer getMsgStatus() {
        return msgStatus;
    }

    public void setMsgStatus(Integer msgStatus) {
        this.msgStatus = msgStatus;
    }

    public void setTemplateCode(Integer templateCode) {
        this.templateCode = templateCode;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getMsgCode() {
        return msgCode;
    }

    public void setMsgCode(String msgCode) {
        this.msgCode = msgCode;
    }

    public Integer getMsgId() {
        return msgId;
    }

    public void setMsgId(Integer msgId) {
        this.msgId = msgId;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public Object getMsgContent() {
        return msgContent;
    }

    public void setMsgContent(Object msgContent) {
        this.msgContent = msgContent;
    }

    public String getMsgSender() {
        return msgSender;
    }

    public void setMsgSender(String msgSender) {
        this.msgSender = msgSender;
    }

    public String getMsgReceiver() {
        return msgReceiver;
    }

    public void setMsgReceiver(String msgReceiver) {
        this.msgReceiver = msgReceiver;
    }

    @Override
    protected Serializable pkVal() {
        return this.msgId;
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author duxiaoguang
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "msgId");
    }

}
